<h:panelGroup xmlns:h='http://java.sun.com/jsf/html'
              xmlns:f='http://java.sun.com/jsf/core'
              xmlns:p='http://primefaces.org/ui'
              xmlns:z='http://savanti.com.bo/ui'
              xmlns:x='http://java.sun.com/jsf/composite/ui/component' styleClass='IIInventario' id='IIInventario'><p:growl id='growl'/>

<p:toolbar styleClass='toolBar'>

<p:toolbarGroup style='width:100%'>

<p:commandButton icon='ui-icon-new'  title='Nuevo' actionListener='#{IIInventario.uiClean}'  update='@(.IIInventario)' style='width:70px' process='@this'/>

<p:commandButton id='#{formId}btnTitle' value='RESUMEN' style='width:10%;position:absolute;left:40%;background: transparent;border: none;font-weight: bold' actionListener='#{IIInventario.uiForm}'  update='@(.IIInventario)' process='@this'/>

<p:commandButton icon='ui-icon-find' title='Buscar'  actionListener='#{IIInventario.uiFind}'   update='@(.IIInventario)' style='width:70px;float:right' process='@this ps'/>

</p:toolbarGroup>

</p:toolbar>


<p:contextMenu for='#{formId}btnTitle' style='width:80px' rendered='#{not empty IIInventario.lsEntity}'>

<p:menuitem icon='ui-icon-print' style='padding-left:8px' value='.. csv' ajax='false'><p:dataExporter type='csv' target='tblPrd' fileName='RESUMEN INVENTRAIO X ALMACEN'/></p:menuitem>

<p:menuitem icon='ui-icon-print' style='padding-left:8px' value='.. xls' ajax='false'><p:dataExporter type='xls' target='tblPrd' fileName='RESUMEN INVENTRAIO X ALMACEN' postProcessor='#{IIInventario.processXLS}'/></p:menuitem>

<p:menuitem icon='ui-icon-search' style='padding-left:8px' value='.. Filtrar' actionListener='#{IIInventario.uiFilter}'  update='@(.IIInventario)' process='@this'/>

</p:contextMenu>


<h:panelGrid columns='1' width='100%' rendered='#{IIInventario.form}'>

<h:panelGrid id='bean' columns='2' styleClass='bean align-top'>

  <x:beanPanel id='hd' bean='#{IIInventario}' title='Resumen inventario' cellpadding='7'>

  <x:fieldN t='Total' v='#{IIInventario.total}'/>

  </x:beanPanel>


  <x:beanPanel id='ps' bean='#{IIInventario}' title='Buscar' cellpadding='5' columns='1' style='min-width: 300px'>

  <x:fieldL b='#{bean}' t='Almacen' v='#{IIInventario.almacenId}'/>

  </x:beanPanel>

</h:panelGrid>

</h:panelGrid>


<p:dataTable id='tblPrd' value='#{IIInventario.lsEntity}' var='x' paginator='true' paginatorPosition='bottom' rows='500' resizableColumns='true' rendered='#{not empty IIInventario.lsEntity}'

                 paginatorAlwaysVisible='false' emptyMessage='' selectionMode='single' rowKey='#{x.material.id}' filteredValue='#{IIInventario.lsFiltered}' style="width:100%;background: transparent">

  <p:column rendered='#{IIInventario.filter}' filterMatchMode='contains' filterStyleClass='columnFind' filterBy='#{x.material.codigo}' sortBy='#{x.material.codigo}' style='background:transparent;width:55px'>                 <f:facet name='header'><h:outputText value='Codigo'  /></f:facet><h:outputText value='#{x.material.codigo}' title='Valuacion #{x.material.valuacion}'/></p:column>

  <p:column rendered='#{IIInventario.filter}' filterMatchMode='contains' filterStyleClass='columnFind' filterBy='#{x.material.nombre}' sortBy='#{x.material.nombre}' style='background:transparent'>                            <f:facet name='header'><h:outputText value='Nombre'  /></f:facet><h:outputText value='#{x.material.nombre}'/>     </p:column>

  <p:column rendered='#{IIInventario.filter}' filterMatchMode='contains' filterStyleClass='columnFind' filterBy='#{x.actual}'          sortBy='#{x.actual}'          style='background:transparent;width:55px'>                 <f:facet name='header'><h:outputText value='Cantidad' title='actual'/></f:facet><z:outputN v='#{x.actual}' r='0'/></p:column>

  <p:column rendered='#{IIInventario.filter}' filterMatchMode='contains' filterStyleClass='columnFind' filterBy='#{x.saldoCosto}'      sortBy='#{x.saldoCosto}'      style='background:transparent;width:50px'>                 <f:facet name='header'><h:outputText value='Costo'    title='saldo'/></f:facet><z:outputN v='#{x.saldoCosto}'/>   </p:column>

  <p:column rendered='#{IIInventario.filter}' filterMatchMode='contains' filterStyleClass='columnFind' filterBy='#{x.saldoValor}'      sortBy='#{x.saldoValor}'      style='background:transparent;width:50px;font-weight:bold'><f:facet name='header'><h:outputText value='Total'    title='saldo'/></f:facet><z:outputN v='#{x.saldoValor}'/>   </p:column>


  <p:column rendered='#{!IIInventario.filter}' sortBy='#{x.material.codigo}' style='background:transparent;width:55px'>                 <f:facet name='header'><h:outputText value='Codigo'  /></f:facet><h:outputText value='#{x.material.codigo}' title='Valuacion #{x.material.valuacion}'/></p:column>

  <p:column rendered='#{!IIInventario.filter}' sortBy='#{x.material.nombre}' style='background:transparent'>                            <f:facet name='header'><h:outputText value='Nombre'  /></f:facet><h:outputText value='#{x.material.nombre}'/>     </p:column>

  <p:column rendered='#{!IIInventario.filter}' sortBy='#{x.actual}'          style='background:transparent;width:55px'>                 <f:facet name='header'><h:outputText value='Cantidad' title='actual'/></f:facet><z:outputN v='#{x.actual}' r='0'/></p:column>

  <p:column rendered='#{!IIInventario.filter}' sortBy='#{x.saldoCosto}'      style='background:transparent;width:50px'>                 <f:facet name='header'><h:outputText value='Costo'    title='saldo' /></f:facet><z:outputN v='#{x.saldoCosto}'/>  </p:column>

  <p:column rendered='#{!IIInventario.filter}' sortBy='#{x.saldoValor}'      style='background:transparent;width:50px;font-weight:bold'><f:facet name='header'><h:outputText value='Total'    title='saldo' /></f:facet><z:outputN v='#{x.saldoValor}'/>  </p:column>

</p:dataTable>

</h:panelGroup>    